<% include ../common/header.ejs %>
    
    
    <div class="container">
        <% if(success){ %>
            <div class="alert alert-success" role="alert"><%= success %></div>
        <% } %>
        <% if(error){ %>
            <div class="alert alert-danger" role="alert"><%= error %></div>
        <% } %>
        <table class="table">
                <thead>
                    <tr>
                        <th><span class="icon iconfont">&#xe671;</span>序号</th>
                        <th>待办事项</th>
                        <th>操作</th>
                    </tr>
                </thead>
                
                <% for(let i=0;i<lists.length;i++){ %>
                <tr>
                    <td>1</td>
                    <td><a href="/article/content?id=<%=lists[i].id %>"><%= lists[i].title %></a></td>
                    <td>
                        <a class="btn btn-default btn-xs" href="/article/edit?id=<%=lists[i].id %>" role="button"> <span class="icon iconfont">&#xe645;</span>编辑</a>
                        <a class="btn btn-danger btn-xs" href="javascript:del(<%=lists[i].id %>)" role="button">删除</a>
                    </td>
                </tr>
                <% } %>
                
            </table>
            <a class="btn btn-success" href="/article/add" role="button">添加事项</a>
    </div>
   

<% include ../common/footer.ejs%>